package org.example.controller;


import org.example.service.ExcelImportService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;

@RestController
@RequestMapping("/api/import")
public class ExcelImportController {
    @Autowired
    private ExcelImportService excelImportService;

    @PostMapping("/students")
    public String importStudents(@RequestParam("file") MultipartFile file) {
        return excelImportService.importStudentsFromExcel(file);
    }
}